const express = require("express");
const router = express.Router();
const expressJoi = require("@escook/express-joi")
const productHandler = require('../router_handler/product')
const { reg_addProduct_schema, reg_editProduct_schema } = require("../schema/product")

router.get('/getProduct', productHandler.getProduct)
router.post('/addProduct', expressJoi(reg_addProduct_schema), productHandler.addProduct)
router.post('/editProduct', expressJoi(reg_editProduct_schema), productHandler.editProduct)
router.get('/deleteProduct', productHandler.deleteProduct)

router.post('/applyProduct', productHandler.applyProduct)
router.get('/getApplyProduct', productHandler.getApplyProduct)

router.get('/withdraw', productHandler.withdraw)

router.post('/auditProduct', productHandler.auditProduct)

router.get('/getOutproduct', productHandler.getOutproduct)

module.exports = router